<?php
/**
 * 运营-运营总表配置
 * (model)
 */
namespace App\Models\Operation;

use Illuminate\Database\Eloquent\Model;
class BATotalCondition extends Model
{
    protected $table = 'operation_total_condition';

    protected $guarded = [];

    public static function getReportDate(){
        return self::query()->value('report_date');
    }

    public static function upReportDate($currentReportDate){
        $date = date('Y-m-d',strtotime('+1 days',strtotime($currentReportDate)));
        $re = self::query()->first();
        $re->report_date = $date;
        return $re->save();
    }
}
